<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
   <%@ include file="/common/CimsCommon.jsp" %>
   <title>新增合作机构交易流水表</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="<%=basePath%>/css/cims/cmmBase.css">
	<script type="text/javascript" src="<%=basePath%>/js/cims/loanDealManage/loanDealDetail.js"></script>
	<script type="text/javascript" src="${basePath}/js/cims/publicJs/modelManage.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#isDeleteAndIsExport").val("true");
			var value = $('#dtocooperorgCode').val();
			var cooperorgType = $('#cooperorgType').val();
			$("#operation").attr("disabled","disabled");
			$("#statementDate").attr("disabled","disabled");
			if(value==""|| null ==value){
				toAddContract();
				
			}else{
				initFnLoanDetailView();				
				searchCreditPackage("creditPackage","${dealDto.creditPackageName}","update");
				LoanValueSum();
				/* if(cooperorgType!=cimsConstant.COOPERORG_TYPE_TWO){
					$("#importLoanFileResult").hide();
				} */
			}
			
			costParameters("costParameter");
	   		
		});
	</script>
	
</head>
  
<body style="background-color:#FFFFFF;">
<div id="formPageSwap">
  <br/>
<form id="addNewsFormData" name="addNewsFormData" isCheck="true" action="com.jy.modules.cims.creditDeal.controller.TCMmCooperorgDealController">
 <table id="addNewsTableId" class="formTableSwap" style="background:#D9D8DF;" border="0" align="center" cellpadding="0" cellspacing="1" >
<tr>
<td colspan="6" align="center" class="thTop">合约信息 <!-- <span id="spanCode"><a class="aColor" href="javascript:void(0)" onclick="toAddContract()" >导入合约</a></span> --></td>
</tr>
<tr>
  <th> 合作机构 ：</th>
  <td >
  <input type="text" style="display:none;" id="exportType" value="loan">
  <input type="text" style="display:none;" id="cooperorgType" value="${dto.cooperorgDTO.type}">
  <input type="text" style="display:none;" id="isPlan" value="${dto.cdto.isPlan}">
  <input type="text" style="display:none;" name="isSelectContract" id="isSelectContract" value="true">
  <input type="text" style="display:none;" id="isDeleteAndIsExport" value="false">
  <input type="text" style="display:none;" name="id" id="idValue" >
  <input type="text" style="display:none;" name="dealCode" id="dealCode" value="${dealCode}" >
  <input type="text" style="display:none;" name="fileName" id="fileName" value="贷款信息">
  <input type="text" style="display:none;" name="dealTypes" id="dealTypes" value="'03','04'">
  <input disabled="disabled" style="display:none;" type="text" class="text" id="dtocooperorgCode" name="cooperorgCode"   value="${dto.cooperorgDTO.cooperorgCode}" />
  <input disabled="disabled" type="text" class="text" id="dtocooperorgName" name="cooperorgName"   value="${dto.cooperorgDTO.cooperorgName}" />
  </td>
  <th> 协议名称 ：</th>
  <td > 
  <input disabled="disabled" type="text" class="text" id="dtoagreementName" name="agreementName"   value="${dto.agreementDTO.agreementName}" />
  </td>
  <th> 合约名称 ：</th>
  <td > 
  <input disabled="disabled" style="display:none;" type="text" class="text" id="dtocontractCode" name="contractCode"   value="${dto.cdto.contractCode}" />
  <input disabled="disabled" type="text" class="text" id="dtocontractName" name="contractName"   value="${dto.cdto.contractName}" />
  </td> 
</tr>

<th style="display:none;"> 交易类型 ：</th>
  <td style="display:none;">
	<syscode:dictionary name="dealType" extendProperty="notNull=false" codeType="LOAN_DEAL_TYPE" id="dealType"	
      defaultValue="${dto.cdto.dealType}" className="text" type="select"/>
  </td>

<tr>
  <th> 价格认定方：</th>
  <td colspan="6"> 
<syscode:dictionary name="creditorAffirmRule" extendProperty="notNull=false" codeType="creditConfirm" id="creditorAffirmRule"	
      defaultValue="${dto.cdto.creditorAffirmRule}" className="text" type="select"/>  </td>  
</tr>
<tr id="creditRestrainTitle">
<td colspan="6" align="center" class="thTop">债权约束</td>
</tr>

<tr id="creditRestrainTitleValue">
	<td colspan="6">
		<%@include file="../limitRequest/contractConstraint.jsp" %>
	</td>
</tr>

<tr id="creditOperation">
 	<td colspan="6" align="center" class="thTop">贷款操作</td>	
</tr>

<tr id="creditPackageColumn">
   <th> 选择包：</th>
   <td>
  	  <select id="creditPackage" onchange="creditPackageOperation(this)" ></select>
  </td>
  <th> 费用参数：</th> 
  <td colspan="3">
  	  <select id="costParameter" >   
  </td>  
 <%--  <td colspan="4">
  	<input id="creditPackageWrite"  type="text" value="${dealDto.creditPackageName}">
  </td> --%>
<%--    <th> 账单日：</th>
   <td colspan="2">
  	  <syscode:dictionary defaultValue="${dealDto.billDate}"  name="statementDate" codeType="TATEMENT_DATE" id="statementDate" className="text" type="select"/>
  </td> --%>
</tr>
</table>

<!-- 列表按钮操作 start -->
	<div id="creditDetailOperation" class="tableToolbar">
		  	<!-- <a href="javascript:void(0)" onclick="exportBpFile()" >导出报盘文件</a>
		  	<a href="javascript:void(0)" onclick="toImportHpFile()" >导入回盘文件</a> -->
<!-- 		  	<a href="javascript:void(0)" onclick="refusedLend()" >拒绝放款</a> -->
		  	<a href="javascript:void(0)" id="importLoanFileResult" onclick="importCreditDetail('true','FUNDOUT')" >导入</a>
		  	<a href="javascript:void(0)" id="importLoanFileResult" onclick="sureExport()" >导出</a>
		  	<a href="javascript:void(0)" id="feeCalc" onclick="feeCalcLoan();" >费用计算</a>
	</div>

	<div id="creditDetailTable">
		<%@include file="../loanDealManage/viewLoanDetailOffer.jsp" %>
	</div>
 
<!-- <table class="formTableSwap" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
 	<td colspan="6" align="center" class="thTop">债权结算</td>	
</tr>

<tr>
  <th style="width:100px;"> 费用金额：</th>
  <td colspan="6" align="left"> 
  <input type="text" class="text" id="dtopracticalSellSum" name="practicalSellSum"  maxLength="11" value="" />
  </td>
 
</tr>
</table> -->

</form>
<div class="expandToolbar">
<!-- 		<span class="submitBtn mouseName" onclick="saveLoanManage()">保存</span>
 -->		<span class="submitBtn mouseName" onclick="closeFatherOffer()">关闭</span>
</div>
<div>
	<br  /><font color="red">导入excel信息必须为导出数据的模板，每次导入数据建议为一千条数据。</font>
	<br  /><font color="red">导入excel信息贷款状态填写内容为“放款成功”，“放款失败”。</font>
</div>
</div>

</body>

<script type="text/javascript">
   $(document).ready(function(){
   	checkedInit();
   	$("#creditorAffirmRule").prop("disabled",true);
	});
	
	
	
</script>
  
</html>
